package com.example.core.license.utils;


import lombok.Data;


@Data
public class Result {

    private int code;

    private Object data;

    public static Result success() {
        Result result = new Result();
        result.setCode(200);
        return result;
    }

    public static Result success(Object obj) {
        Result result = new Result();
        result.setCode(200);
        result.setData(obj);
        return result;
    }

    public static Result error(String msg) {
        Result result = new Result();
        result.setCode(400);
        result.setData(msg);
        return result;
    }
}
